package com.caocaog.market.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caocaog.market.modules.BaseEntity;
import com.caocaog.market.vo.GoodsAttributeVo;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecg.common.aspect.annotation.Dict;
import org.jeecgframework.poi.excel.annotation.Excel;

import java.io.Serializable;
import java.util.List;

/**
 * @Description: 商品表
 * @Author: jeecg-boot
 * @Date:   2021-11-12
 * @Version: V1.0
 */
@Data
@TableName("mk_goods_basic")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="mk_goods_basic对象", description="商品表")
public class GoodsBasic extends BaseEntity implements Serializable {
    private static final long serialVersionUID = 1L;

	/**版本*/
	@Excel(name = "版本", width = 15)
    @ApiModelProperty(value = "版本")
    private Integer lockVersion;
	/**商品全称*/
	@Excel(name = "商品全称", width = 15)
    @ApiModelProperty(value = "商品全称")
    private String name;
	/**商品简称*/
	@Excel(name = "商品简称", width = 15)
    @ApiModelProperty(value = "商品简称")
    private String shortName;
	/**商品分类*/
	@Excel(name = "商品分类", width = 15, dictTable = "mk_goods_sort", dicText = "name", dicCode = "id")
	@Dict(dictTable = "mk_goods_sort", dicText = "name", dicCode = "id")
    @ApiModelProperty(value = "商品分类")
    private String sorts;
    /**排序*/
    @Excel(name = "排序", width = 15)
    @ApiModelProperty(value = "排序")
    private Integer sort;
	/**商品原价*/
	@Excel(name = "商品原价", width = 15)
    @ApiModelProperty(value = "商品原价")
    private String originalPrice;
	/**商品现价*/
	@Excel(name = "商品现价", width = 15)
    @ApiModelProperty(value = "商品现价")
    private String presentPrice;
	/**商品代码*/
	@Excel(name = "商品代码", width = 15)
    @ApiModelProperty(value = "商品代码")
    private String code;
	/**商品图片*/
	@Excel(name = "商品图片", width = 15)
    @ApiModelProperty(value = "商品图片")
    private String picture;
	/**商品完整描述*/
	@Excel(name = "商品完整描述", width = 15)
    @ApiModelProperty(value = "商品完整描述")
    private String description;
	/**商品简单描述*/
	@Excel(name = "商品简单描述", width = 15)
    @ApiModelProperty(value = "商品简单描述")
    private String shortDescription;
	/**商品上下架状态*/
	@Excel(name = "商品上下架状态", width = 15, dicCode = "mk_goods_status")
	@Dict(dicCode = "mk_goods_status")
    @ApiModelProperty(value = "商品上下架状态")
    private String status;
	/**是否首页展示*/
	@Excel(name = "是否首页展示", width = 15, dicCode = "mk_whether")
	@Dict(dicCode = "mk_whether")
    @ApiModelProperty(value = "是否首页展示")
    private String isIndex;
	/**是否热门产品*/
	@Excel(name = "是否热门产品", width = 15, dicCode = "mk_whether")
	@Dict(dicCode = "mk_whether")
    @ApiModelProperty(value = "是否热门产品")
    private String isHot;
	/**浏览次数*/
	@Excel(name = "浏览次数", width = 15)
    @ApiModelProperty(value = "浏览次数")
    private Integer visitNum;
	/**销售数量*/
	@Excel(name = "销售数量", width = 15)
    @ApiModelProperty(value = "销售数量")
    private Integer saleNum;

    @ApiModelProperty(value = "商品描述")
    private String goodDetail;
	/**是否删除*/
	/*@Excel(name = "是否删除", width = 15, dicCode = "mk_whether")
	@Dict(dicCode = "mk_whether")
    @ApiModelProperty(value = "是否删除")
    private String delFlag;*/
    @TableField(exist = false)
    @ApiModelProperty(value = "商品规格信息")
    private List<GoodsAttributeVo> goodsSpecificationsVoList;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品属性信息")
    private List<GoodsAttributeVo> goodsAttributeVoList;

    /**关联店铺表（mk_shop_basic表中的id字段）；店铺id*/
    @Excel(name = "关联店铺表（mk_shop_basic表中的id字段）；店铺id", width = 15)
    @ApiModelProperty(value = "关联店铺表（mk_shop_basic表中的id字段）；店铺id")
    @Dict(dictTable = "mk_shop_basic",dicCode = "id",dicText = "name")
    private String shopId;
    /**起售数量*/
    @Excel(name = "起售数量", width = 15)
    @ApiModelProperty(value = "起售数量")
    private java.lang.Integer salesQuantity;

    @TableField(exist = false)
    @ApiModelProperty(value = "商品规格信息")
    private List<GoodsSpec> goodsSpecificationsList;

    @ApiModelProperty(value = "商品属性信息")
    @TableField(exist = false)
    private List<GoodsAttr> goodsAttributeList;

    /**店铺名称*/
    @TableField(exist = false)
    @ApiModelProperty(value = "店铺名称")
    private String shopName;

    @ApiModelProperty("商品销量")
    private Integer textMonthly;
}
